﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace SedionFormDesigner.Serializer.BasicStruct
{
    public class ElementModel
    {
        protected String template = null;

        private String baseValue;
        public String BaseValue
        {
            get { return baseValue; }
            set { baseValue = value; }
        }

        private String styleValue;
        public String StyleValue
        {
            get { return styleValue; }
            set { styleValue = value; }
        }

        private String val;
        public String Value
        {
            get
            {
                return val;
            }
            set
            {
                val = value;
            }
        }

        private Type type;
        public Type Type
        {
            get { return type; }
            set { type = value; }
        }

        public String ValueType;
        public ElementModel()
        {

        }

        public ElementModel(String template, Type type)
        {
            this.template = template;
            this.type = type;
        }

        public void AddBaseValue(String baseValue)
        {
            this.baseValue = String.Concat(this.baseValue, " ", baseValue);
        }

        public override string ToString()
        {
            return String.Format(template, baseValue, styleValue, val);
        }
    }
}
